#include <asm.h>
.intel_syntax noprefix

/// <summary>
/// ASM Version
/// int Syscall0(unsigned int num);
/// </summary>
.globl Syscall0
.type Syscall0, @function
Syscall0:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	int 0x80
	pop ebp
	ret

/// <summary>
/// ASM Version
/// int Syscall1(unsigned int num, int value);
/// </summary>
.globl Syscall1
.type Syscall1, @function
Syscall1:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	mov ebx, [ebp+12]
	int 0x80
	pop ebp
	ret

/// <summary>
/// ASM Version
/// int Syscall2(unsigned int num, int param1, int param2);
/// </summary>
.globl Syscall2
.type Syscall2, @function
Syscall2:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	mov ebx, [ebp+12]
	mov ecx, [ebp+16]
	int 0x80
	pop ebp
	ret

/// <summary>
/// ASM Version
/// int Syscall3(unsigned int num, int param1, int param2, int param3);
/// </summary>
.globl Syscall3
.type Syscall3, @function
Syscall3:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	mov ebx, [ebp+12]
	mov ecx, [ebp+16]
	mov edx, [ebp+20]
	int 0x80
	pop ebp
	ret

/// <summary>
/// ASM Version
/// int Syscall4(unsigned int num, int param1, int param2, int param3, int param4);
/// </summary>
.globl Syscall4
.type Syscall4, @function
Syscall4:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	mov ebx, [ebp+12]
	mov ecx, [ebp+16]
	mov edx, [ebp+20]
	mov esi, [ebp+24]
	int 0x80
	pop ebp
	ret

/// <summary>
/// ASM Version
/// int Syscall5(unsigned int num, int param1, int param2, int param3, int param4, int param5);
/// </summary>
.globl Syscall5
.type Syscall5, @function
Syscall5:
	push ebp
	mov ebp, esp
	mov eax, [ebp+8]
	mov ebx, [ebp+12]
	mov ecx, [ebp+16]
	mov edx, [ebp+20]
	mov esi, [ebp+24]
	mov edi, [ebp+28]
	int 0x80
	pop ebp
	ret

